<?php
/* SVN FILE: $Id: add.ctp 11 2009-09-12 23:39:35Z kenreily@gmail.com $ */
/**
 * Short description for file.
 *
 * Long description for file
 *
 * PHP versions 4 and 5
 *
 * Recenseo: Online submission and reviewing for education
 * Copyright 2008-2009, Ken Reily
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * $Date: 2009-09-12 23:39:35 +0000 (Sat, 12 Sep 2009) $
 * $Revision: 11 $
 * $Author: kenreily@gmail.com $
 * $HeadURL: http://recenseo.googlecode.com/svn/trunk/app/views/assessment_test_cases/add.ctp $
 */

  echo $form->create('AssessmentTestCase',array('action' => '/add/' . $assessment_id));

  $disableTestCase = false;
  if (isset($test_case_id) && !empty($test_case_id))
  {
    $disableTestCase = true;
  }

  echo $form->input('AssessmentTestCase.test_case_id',
                    array('options' => $test_cases,
                          'empty' => '(New Test Case)',
                          'after' => '<p><small>(Drop this down to select a previously defined test case)</small></p>'));
  
  // Name
  echo $form->input('TestCase.name',
                    array('label' => 'Test Case Name',
                          'after' => '<p><small>(Give this test case a name so that you can use it again in future assessments. <strong>Only required for new test cases!</strong>)</small></p>',
                          'disabled' => $disableTestCase));
  
  // Description
  echo $form->input('TestCase.description',
                    array('label' => 'Test Case Description',
                          'after' => '<p><small>(Describe the precise steps you performed when executing this test. <strong>Only required for new test cases!</strong>)</small></p>',
                          'disabled' => $disableTestCase));
  
  // Results
  echo $form->input('AssessmentTestCase.results',
                    array('label' => 'Test Case Results',
                          'after' => '<p><small>(Describe what the program did when you executed this test.)</small></p>'));
  
  // Outcome
  echo $form->input('AssessmentTestCase.test_case_result_id',
                    array('options' => $test_case_results,
                          'empty' => '(Choose Outcome)'));

  echo $form->end('Add Test Case');
  
?>